//
//  ViewCalculator.hpp
//  demo
//
//  Created by vonchenchen on 2021/3/19.
//  Copyright © 2021 vonchenchen. All rights reserved.
//

#ifndef ViewCalculator_hpp
#define ViewCalculator_hpp

#include "ToyMath.h"

using namespace ToyCube;

class ViewCalculator{
  
public:
    ViewCalculator();
    virtual ~ViewCalculator();
    
    void InitEyePos(const Vec<3, float> &eye_pos);

    Vec<3, float> RotateX(Vec<3, float> &eye_pos, float add_r_degree);
    Vec<3, float> RotateY(Vec<3, float> &eye_pos, float add_r_degree);
    Vec<3, float> RotateZ(Vec<3, float> &eye_pos, float add_r_degree);
    
protected:
    Vec<3, float> Rotate(Vec<3, float> &eye_pos, int aix, float r_degree);

    Vec<3, float> _eye_pos;
    float _rotate_x;
    float _rotate_y;
    float _rotate_z;
};

#endif /* ViewCalculator_hpp */
